import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/views/Home'
import Member from '@/views/Member'
import Newslist from '@/views/news/newslist'
import NewsDetail from '@/views/news/NewsDetail'
import ImgList from '@/views/imgs/ImgList'
import ImgDetail from '@/views/imgs/ImgDetail'
import GoodsList from '@/views/goods/GoodsList'
import GoodsDetail from '@/views/goods/GoodsDetail'
import Cart from '@/views/goods/Cart'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home
    },
    {
      path: '/member',
      name: 'member',
      component: Member
    },
    {
      path: '/newslist',
      name: 'newslist',
      component: Newslist
    },
    {
      path: '/news_detail/:id',
      name: 'news_detail',
      component: NewsDetail
    },
    {
      path: '/img_list',
      name: 'img_list',
      component: ImgList
    },
    {
      path: '/img_detail/:id',
      name: 'img_detail',
      component: ImgDetail
    },
    {
      path: '/goods_list',
      name: 'goodslist',
      component: GoodsList
    },
    {
      path: '/goods_detail/:id',
      name: 'goodsdetail',
      component: GoodsDetail
    },
    {
      path: '/cart',
      name: 'cart',
      component: Cart
    }
  ]
})
